﻿<!DOCTYPE html>
<html>
<head>
    <title>填写验证码</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="description" content="登录系统">
    <link href="css/jquery-weui.css" rel="stylesheet" type="text/css" />
    <link href="css/weui.css" rel="stylesheet" type="text/css" />
    <script src="js/zepto.min.js" type="text/javascript"></script>
    <link href="css/weui.min.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="css/jquery-weui.css">
    <link rel="stylesheet" href="css/css.css">
</head>
<body ontouchstart>
    <form id="form">
    <header class="bar bar-nav">
        <a href="#" class="icon pull-left"><i class="sst-wode">
            <img src="img/arr_03.png" width="100%" />
        </i></a>
        <h1 class="title">
            填写验证码</h1>
    </header>
    <div class="weui_cells_con">
        <p>
            我们已发送短信验证码到 <strong>18988888888</strong>
    </p> </div>
   
    <div class="weui_cells weui_cells_form">
        <div class="weui_cell">
            <div class="weui_cell_hd">
                <div class="ico">
                    <img src="img/wxe.png" width="100%" /></div>
            </div>
            <div class="weui_cell_bd weui_right">
                <input class="weui_input weui_inputy" type="num" required pattern="[0-9]{6}" maxlength="6"
                    placeholder="请输入验证码" emptytips="请输入验证码" notmatchtips="请输入正确的验证码">
            </div>
            <div class="weui-cell__ft pull-right">
                <button class="weui-vcode-btn pull-right">
                    重新发送(56s)</button>
            </div>
            <div class="weui_cell_ft pull-right">
                <i class="weui_icon_warn pull-right"></i>
            </div>
        </div>
        <div class="weui_cell weui_cell_warn notopb nobotb" id="bijiao">
            <div class="weui_btn_area">
                <input id="formSubmitBtn" type="button" value="下一步" class="weui_btn weui_btn_primary" />
            </div>
        </div>
        <div class="weui_cell_bd notopb nobotb">
            <div class="weui-cell__ft pull-right">
                <button class="weui-vcode-btn weui-rui-btn">
                    重新获取</button>
            </div>
        </div>
    </div>
    </form>
    <script>
        var $form = $("#form");
        $form.form();
        $("#formSubmitBtn").on("click", function () {
            $form.validate(function (error) {
                if (error) {
                    $("#bijiao").addClass("weui_cell_warn");

                } else {
                    $("#bijiao").removeClass("weui_cell_warn");
                    $.toptips('验证通过提交', 'ok');
                }
            });


        });
        $(function () {
            $(".weui_cell_bd .weui_inputy").keyup(function () {
                if ($(this).val().length == 6)
                { $("#bijiao").removeClass("weui_cell_warn"); }
                else
                { $("#bijiao").addClass("weui_cell_warn"); }
            });
        })
    </script>
</body>
</html>
